package com.tangding.pojo.request;

import com.tangding.annotations.Range;

/**
 * @author Ranger
 * @version 2017年8月24日_下午5:25:37
 * @description
 */
public class PageParams extends BaseParams {
    /**
     * 页码
     */
    @Range(Max = 10, Min = 0, boundary = 0B11)
    private int pageIndex;
    /**
     * 页大小
     */
    @Range(Max = 20, Min = 1, boundary = 0B11)
    private int pageSize;
	public int getPageIndex() {
		return pageIndex;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	/**
	 * 获取开始下标
	 * 
	 * @return
	 */
	public int getStartIndex() {
		return pageIndex * pageSize;
	}
}
